import request from '@/utils/request'

// 查询物资检修列表
export function listElecMaterialRepair(query) {
  return request({
    url: '/elec/elecMaterialRepair/list',
    method: 'get',
    params: query
  })
}

// 查询物资检修详细
export function getElecMaterialRepair(repairId) {
  return request({
    url: '/elec/elecMaterialRepair/' + repairId,
    method: 'get'
  })
}

// 查询用户下拉框
export function listUserOptions(query) {
  return request({
    url: '/bas/basWarehouse/userOptions',
    method: 'get',
    params: query
  })
}

// 查询物资列表
export function listElecMaterial(query) {
  return request({
    url: '/elec/elecMaterial/list',
    method: 'get',
    params: query
  })
}

// 新增物资检修
export function addElecMaterialRepair(data) {
  return request({
    url: '/elec/elecMaterialRepair',
    method: 'post',
    data: data
  })
}

// 修改物资检修
export function updateElecMaterialRepair(data) {
  return request({
    url: '/elec/elecMaterialRepair',
    method: 'put',
    data: data
  })
}

// 删除物资检修
export function delElecMaterialRepair(repairId) {
  return request({
    url: '/elec/elecMaterialRepair/' + repairId,
    method: 'delete'
  })
}
